<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:c="http://www.w3.org/1999/XSL/Transform">
<head>
    <meta charset="utf-8">
<!--    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />-->
    <title></title>
    <link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" />
    <script src="js/jquery.min.js"></script>
    <script src="js/jquery.mobile-1.4.5.min.js"></script>
    <script>
    	$("#mypanel").trigger("updatelayout");
   	</script>
   	<script>
   		$(document).ready(function() {
   			$("div").bind("swiperight",function(event) {
   				$("#mypanel").panel("open");
   			});
   		});
   	</script>
	<script>
		function li_1(){
			window.location.href="http://localhost:8080/findAll";
		};
		function li_2(){
			window.location.href="http://localhost:8080/index01";
		};
		function li_3(){
			window.location.href="http://localhost:8080/index03";
		};
		function li_4(){
			window.location.href="http://localhost:8080/index02";
		};
	</script>
   	<script>
   		function login(){
   			var name=$("#name").val();
   			var password=$("#password").val();
   			$.ajax({
   				type:"post",
   				url:"http://192.168.43.203:8080/myfriend/loginservlet",
   				async:false,
   				data:{"name":name,"password":password},
   				dataType:"json",
   				success:function(data){
   					alert(name+"管理员成功登录");
   					window.location.href="ht.html";
   				}
   			});
   		}
   	</script>
</head>
<body>
	<div data-role="page">
		<div data-role="panel" id="mypanel" data-swipe-close="false">
			<h4>作者：梁海琦</h4>
			<h4>作者介绍</h4>
			<p>就读于东莞理工学院城市学院</p>
			<p>性格开朗、稳重、有活力，待人热情、真诚；工作认真负责，积极主动，
			能吃苦耐劳，用于承受压力，勇于创新；有很强的组织能力和团队协作精神，
			具有较强的适应能力；纪律性强，工作积极配合；意志坚强，具有较强的无私奉献精神</p>
		</div>
		<div data-role="header" data-position="fixed" data-theme="b">
			<a href="#" data-role="button" data-iconpos="left" data-icon="arrow-l">返回</a>	
			<h1>我的伙伴</h1>
			<a href="#mypanel" data-role="button" data-iconpos="right" data-icon="grid">关于</a>	
		</div>
		<div data-role="content">
			<img src="img/logo.png" style="width:50%; margin-left:25%;"/>
			<form action="#" th:action="@{/login}"  method="post">
				<input type="text" name="name" id="name" placeholder="账号："  />
				<input type="password" name="password" id="password" placeholder="密码："  />
				<input type="submit" value="登录">
				
<!--				<div class="ui-grid-solo">-->
<!--					<div class="ui-block-a">-->
<!--						<button type="button" data-theme="e" onclick="login()">登录</button>-->
<!--					</div>-->
<!--				</div>-->

			</form>
		</div>
		<div data-role="footer" data-position="fixed" data-theme="b">
			<div data-role="navbar" data="c">
				<ul>
					<li><a th:href="@{/findAll}" onclick="li_1()" data-icon="home">成长轨迹</a></li>
					<li><a th:href="@{/index01}" onclick="li_2()" data-icon="plus">爱好推荐</a></li>
					<li><a th:href="@{/index03}" onclick="li_3()" data-icon="star">阶段印象</a></li>
					<li><a th:href="@{/index02}" onclick="li_4()" data-icon="info">后台管理</a></li>
				</ul>
			</div>
		</div>
    </div>
</body>
</html>